import { axios } from '@/utils/request'

const api = {
  list: '/cloud/platform/get-goods-cat',
  del: '/cloud/platform/del-goods-cat',
  save: '/cloud/platform/save-goods-cat',
  dragChange: '/cloud/platform/cat-change'
}

export default api

export function dragChange(parameter) {
  return axios({
    url: api.dragChange,
    method: 'get',
    params: parameter
  })
}

export function list(parameter) {
  return axios({
    url: api.list,
    method: 'get',
    params: parameter
  })
}

export function del(parameter) {
  return axios({
    url: api.del,
    method: 'get',
    params: parameter
  })
}

export function save(parameter) {
  return axios({
    url: api.save,
    method: 'post',
    data: parameter
  })
}
